package com.kk.permission.adapter;

import android.content.Context;

public class PermissionAdapter {
    private static IPermissionAdapter sInstance;

    public interface IPermissionAdapter {
        Context getAppContext();

        void onFinishOpenPermissions();

        boolean prefUtilContainsKey(String str);

        void prefUtilDeleteKey(String str);

        boolean prefUtilGetKeyBoolean(String str, boolean z);

        boolean prefUtilGetKeyBooleanRes(String str, int i);

        float prefUtilGetKeyFloat(String str, float f);

        int prefUtilGetKeyInt(String str, int i);

        int prefUtilGetKeyIntRes(String str, int i);

        long prefUtilGetKeyLong(String str, long j);

        String prefUtilGetKeyString(String str, String str2);

        String prefUtilGetKeyStringRes(String str, int i);

        void prefUtilSetKey(String str, float f);

        void prefUtilSetKey(String str, int i);

        void prefUtilSetKey(String str, long j);

        void prefUtilSetKey(String str, String str2);

        void prefUtilSetKey(String str, boolean z);

        String touchLifeControllerGetExperimentResult(String str);
    }

    public static void init(IPermissionAdapter iPermissionAdapter) {
        sInstance = iPermissionAdapter;
    }

    public static IPermissionAdapter getAdapter() {
        if (sInstance != null) {
            return sInstance;
        }
        throw new IllegalStateException("adapter was not initialized");
    }
}
